package org.qsoft.rpcfx.util;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import java.util.HashMap;

import org.qsoft.rpcfx.bean.IObjectWriter;
import org.qsoft.rpcfx.bean.json.JsonObjectWriter;

public class TestJson {

	/**
	 * @param args
	 */
	public static void main(String[] args) {


		HashMap map = new HashMap();

		Date utilDate=new Date();
		map.put("Date", utilDate);

		java.sql.Timestamp t=new java.sql.Timestamp(utilDate.getTime());
		map.put("Timestamp", t);

		map.put("Byte", new Byte((byte)1));


		Short theShort2=new Short((short) 200); 
		map.put("short", theShort2);


		Long long2=new Long(200); 
		map.put("Long", long2); 

		map.put("nullField", null);

		BigInteger bi1=BigInteger.valueOf(100);
		BigDecimal bd1=BigDecimal.valueOf(100);

		map.put("BigInteger", bi1);
		map.put("BigDecimal", bd1); 
		
		map.put("ssss", "lfcr\r\n\\\""); 
		
		IObjectWriter writer = null;
		writer = new JsonObjectWriter();
		writer.write(map, null);
		System.out.println(writer.result());


	}

}
